package com.lrs.java.j2se_self.ioReview;
import java.io.*;
public class TestFileInputStream {
	public static void main(String[] args){
		FileInputStream in = null ;
		int b=0 , num = 0;
		try{
			in = new FileInputStream("C://test.java");
		}catch(FileNotFoundException e){
			e.getStackTrace();
			System.out.println("file not found!");
			System.exit(-1);
		}
		try {
			while((b = in.read())!=-1){
				System.out.print((char)b);
				num++;
			}
			in.close();
			System.out.println();
			System.out.println("for all you input " + num +" words");
		}catch(IOException e){
			e.getMessage();
			System.exit(-1);
		}
	}
}
